;
; V93.SH Version 1.01 (C)1995,1996 HUDSON SOFT
; ＣＰＵ・システム関連 アセンブラ用ヘッダーファイル(V93.SH)
;
	ifndef	_V93_SH_
_V93_SH_	equ	1
;
IRQ_PRIOF	equ	7
IRQ_PRIOE	equ	6
IRQ_PRIOD	equ	5
IRQ_PRIOC	equ	4
IRQ_PRIOB	equ	3
IRQ_PRIOA	equ	2
IRQ_PRIO9	equ	1
IRQ_PRIO8	equ	0
;
IRQ_LEVELF	equ	0
IRQ_LEVELE	equ	1
IRQ_LEVELD	equ	2
IRQ_LEVELC	equ	3
IRQ_LEVELB	equ	4
IRQ_LEVELA	equ	5
IRQ_LEVEL9	equ	6
IRQ_LEVEL8	equ	7
IRQ_73          equ     0
IRQ_EXT         equ     0
IRQ_70B         equ     1
IRQ_KING        equ     2
IRQ_70A         equ     3
IRQ_KP          equ     4
IRQ_FDC         equ     5
IRQ_TIMER       equ     6
IRQ_TRAP1X      equ     8
SOFT_RESET      equ     9
MATH_ERR        equ     12
;
TIMER_IRQ_OFF	equ	0
TIMER_IRQ_ON	equ	1
;
KP_1		equ	$0001
KP_2		equ	$0002
KP_3		equ	$0004
KP_4		equ	$0008
KP_5		equ	$0010
KP_6		equ	$0020
KP_select	equ	$0040
KP_run		equ	$0080
KP_up		equ	$0100
KP_right	equ	$0200
KP_down		equ	$0400
KP_left		equ	$0800
;
K0		equ	0
K1		equ	8
KC_IN		equ	$4000
KC_OUT		equ	$2000
KC_TAP		equ	$8000

;
;--- Macros
;
	include	"c62dev.sh"
;
_ttcr		macro	reg
		out.h	reg,IO_TIMER_TCR(zero)
		endm
;
_ttcri		macro	value
		mov.h	value,at
		out.h	at,IO_TIMER_TCR(zero)
		endm
;
_ttmr		macro	reg
		out.h	reg,IO_TIMER_TMR(zero)
		endm
;
_ttmri		macro	value
		mov.h	value,at
		out.h	at,IO_TIMER_TMR(zero)
		endm
;
_ttcrr		macro	reg
		in.h	IO_TIMER_TCR(zero),reg
		endm
;
_ttmrr		macro	reg
		in.h	IO_TIMER_TMR(zero),reg
		endm
;
_tdwcr		macro	reg
		in.h	IO_TIMER_DWC(zero),reg
		endm
;
;--- Structs
;
KEYDATA		struct
	align	4
KD_INT:		ds	4
KD_DAT:		ds	4
KD_TRG:		ds	4
KD_OUT:		ds	4
		ends
;
;--- Globls
;
	globl	padS0,padC0,padS1,padC1			;pad_works
	globl	pad00,pad01,pad02,pad03,pad04,pad05	;pad works
	globl	pad10,pad11,pad12,pad13,pad14,pad15	;pad works
;
	globl	irq_enable,irq_disable
	globl	set_irq_level,set_irq_mask,set_irq_vector,set_irq_prio
	globl	cache_enable,cache_disable,cache_clear
	globl	init_get_mem,get_mem,resize_mem,free_mem
	globl	init_timer,start_timer,stop_timer
	globl	fill_mram
	globl	init_reg_set_tb,reg_set,reg_setb,req_reg_set,req_reg_setb
	globl	init_get_pad,int_pad,int_pado,get_pad,set_get_pad_mode
	globl	init_reset_check,reset_check,soft_reset
;
	endif	; !_V93_SH_
;
